<template>
  <div class="box33">



    <van-grid   direction="vertical" squar="true" :gutter="5" column-num="4"   v-for="(item,index,id) in goodlist"  :key="id"  >
  <van-grid-item     @click="toBuyTicket(item.id, item.nm)" > <van-image  width="70"
  height="100" class="img" :src="`${item.poster}`" /></van-grid-item>
 
</van-grid>
    <!-- 盒子 -->
    
     
  </div>
</template>

<script>
import { GetdetailAPI } from "@/api/api.js";
export default {
  name: "MySearch",
  props: {
   goodlist: {
        type: Array,
     default:function(){
        return [
          {

},
        ];
    }
    },
   

  },
  data() {
    return {};
  },

  mounted() {},

  methods: {
    todetail(id) {
      this.$router.push({ path: "/detail/" + id });
    },
    toBuyTicket(id, nm) {
      this.$router.push({
        path: "/buyticket",
        query: { id, nm },
      });
    },
    addSee(id) {
      GetdetailAPI({ movieid: id }).then((res) => {
        this.Detail = res.data.movie;
        if (res.status == 200) {
          const Detail = res.data.movie;
          this.$store.commit("AADTOSEE", Detail);
        }
      });
    },
  },
};
</script>

<style lang="less" scoped>
.box33{width: 100%;
overflow-x:scroll ;
display: flex;

}
.img{
  
  img{
  width:100px;
  height: 120px;

  }
}
</style>